Optimal. Leaf size=208 \[ -\frac {B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )+A}{4 b g^5 (a+b x)^4}+\frac {B d^4 \log (a+b x)}{2 b g^5 (b c-a d)^4}-\frac {B d^4 \log (c+d x)}{2 b g^5 (b c-a d)^4}+\frac {B d^3}{2 b g^5 (a+b x) (b c-a d)^3}-\frac {B d^2}{4 b g^5 (a+b x)^2 (b c-a d)^2}+\frac {B d}{6 b g^5 (a+b x)^3 (b c-a d)}-\frac {B}{8 b g^5 (a+b x)^4} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.14, antiderivative size = 208, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.094, Rules used = {2525, 12, 44} \[ -\frac {B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )+A}{4 b g^5 (a+b x)^4}+\frac {B d^3}{2 b g^5 (a+b x) (b c-a d)^3}-\frac {B d^2}{4 b g^5 (a+b x)^2 (b c-a d)^2}+\frac {B d^4 \log (a+b x)}{2 b g^5 (b c-a d)^4}-\frac {B d^4 \log (c+d x)}{2 b g^5 (b c-a d)^4}+\frac {B d}{6 b g^5 (a+b x)^3 (b c-a d)}-\frac {B}{8 b g^5 (a+b x)^4} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 44
Rule 2525
Rubi steps
\begin {align*} \int \frac {A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{(a g+b g x)^5} \, dx &=-\frac {A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{4 b g^5 (a+b x)^4}+\frac {B \int \frac {2 (b c-a d)}{g^4 (a+b x)^5 (c+d x)} \, dx}{4 b g}\\ &=-\frac {A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{4 b g^5 (a+b x)^4}+\frac {(B (b c-a d)) \int \frac {1}{(a+b x)^5 (c+d x)} \, dx}{2 b g^5}\\ &=-\frac {A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{4 b g^5 (a+b x)^4}+\frac {(B (b c-a d)) \int \left (\frac {b}{(b c-a d) (a+b x)^5}-\frac {b d}{(b c-a d)^2 (a+b x)^4}+\frac {b d^2}{(b c-a d)^3 (a+b x)^3}-\frac {b d^3}{(b c-a d)^4 (a+b x)^2}+\frac {b d^4}{(b c-a d)^5 (a+b x)}-\frac {d^5}{(b c-a d)^5 (c+d x)}\right ) \, dx}{2 b g^5}\\ &=-\frac {B}{8 b g^5 (a+b x)^4}+\frac {B d}{6 b (b c-a d) g^5 (a+b x)^3}-\frac {B d^2}{4 b (b c-a d)^2 g^5 (a+b x)^2}+\frac {B d^3}{2 b (b c-a d)^3 g^5 (a+b x)}+\frac {B d^4 \log (a+b x)}{2 b (b c-a d)^4 g^5}-\frac {A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{4 b g^5 (a+b x)^4}-\frac {B d^4 \log (c+d x)}{2 b (b c-a d)^4 g^5}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.22, size = 162, normalized size = 0.78 \[ -\frac {6 \left (B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )+A\right )+\frac {B \left (12 d^4 (a+b x)^4 \log (c+d x)+12 d^3 (a+b x)^3 (a d-b c)+6 d^2 (a+b x)^2 (b c-a d)^2+4 d (a+b x) (a d-b c)^3+3 (b c-a d)^4-12 d^4 (a+b x)^4 \log (a+b x)\right )}{(b c-a d)^4}}{24 b g^5 (a+b x)^4} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.95, size = 654, normalized size = 3.14 \[ -\frac {3 \, {\left (2 \, A + B\right )} b^{4} c^{4} - 8 \, {\left (3 \, A + 2 \, B\right )} a b^{3} c^{3} d + 36 \, {\left (A + B\right )} a^{2} b^{2} c^{2} d^{2} - 24 \, {\left (A + 2 \, B\right )} a^{3} b c d^{3} + {\left (6 \, A + 25 \, B\right )} a^{4} d^{4} - 12 \, {\left (B b^{4} c d^{3} - B a b^{3} d^{4}\right )} x^{3} + 6 \, {\left (B b^{4} c^{2} d^{2} - 8 \, B a b^{3} c d^{3} + 7 \, B a^{2} b^{2} d^{4}\right )} x^{2} - 4 \, {\left (B b^{4} c^{3} d - 6 \, B a b^{3} c^{2} d^{2} + 18 \, B a^{2} b^{2} c d^{3} - 13 \, B a^{3} b d^{4}\right )} x - 6 \, {\left (B b^{4} d^{4} x^{4} + 4 \, B a b^{3} d^{4} x^{3} + 6 \, B a^{2} b^{2} d^{4} x^{2} + 4 \, B a^{3} b d^{4} x - B b^{4} c^{4} + 4 \, B a b^{3} c^{3} d - 6 \, B a^{2} b^{2} c^{2} d^{2} + 4 \, B a^{3} b c d^{3}\right )} \log \left (\frac {b^{2} e x^{2} + 2 \, a b e x + a^{2} e}{d^{2} x^{2} + 2 \, c d x + c^{2}}\right )}{24 \, {\left ({\left (b^{9} c^{4} - 4 \, a b^{8} c^{3} d + 6 \, a^{2} b^{7} c^{2} d^{2} - 4 \, a^{3} b^{6} c d^{3} + a^{4} b^{5} d^{4}\right )} g^{5} x^{4} + 4 \, {\left (a b^{8} c^{4} - 4 \, a^{2} b^{7} c^{3} d + 6 \, a^{3} b^{6} c^{2} d^{2} - 4 \, a^{4} b^{5} c d^{3} + a^{5} b^{4} d^{4}\right )} g^{5} x^{3} + 6 \, {\left (a^{2} b^{7} c^{4} - 4 \, a^{3} b^{6} c^{3} d + 6 \, a^{4} b^{5} c^{2} d^{2} - 4 \, a^{5} b^{4} c d^{3} + a^{6} b^{3} d^{4}\right )} g^{5} x^{2} + 4 \, {\left (a^{3} b^{6} c^{4} - 4 \, a^{4} b^{5} c^{3} d + 6 \, a^{5} b^{4} c^{2} d^{2} - 4 \, a^{6} b^{3} c d^{3} + a^{7} b^{2} d^{4}\right )} g^{5} x + {\left (a^{4} b^{5} c^{4} - 4 \, a^{5} b^{4} c^{3} d + 6 \, a^{6} b^{3} c^{2} d^{2} - 4 \, a^{7} b^{2} c d^{3} + a^{8} b d^{4}\right )} g^{5}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.77, size = 419, normalized size = 2.01 \[ -\frac {B d^{4} \log \left (-\frac {b c g}{b g x + a g} + \frac {a d g}{b g x + a g} - d\right )}{2 \, {\left (b^{5} c^{4} g^{5} - 4 \, a b^{4} c^{3} d g^{5} + 6 \, a^{2} b^{3} c^{2} d^{2} g^{5} - 4 \, a^{3} b^{2} c d^{3} g^{5} + a^{4} b d^{4} g^{5}\right )}} + \frac {B d^{3}}{2 \, {\left (b^{3} c^{3} g^{3} - 3 \, a b^{2} c^{2} d g^{3} + 3 \, a^{2} b c d^{2} g^{3} - a^{3} d^{3} g^{3}\right )} {\left (b g x + a g\right )} b g} - \frac {B d^{2}}{4 \, {\left (b^{2} c^{2} g - 2 \, a b c d g + a^{2} d^{2} g\right )} {\left (b g x + a g\right )}^{2} b g^{2}} - \frac {B \log \left (\frac {b^{2}}{\frac {b^{2} c^{2} g^{2}}{{\left (b g x + a g\right )}^{2}} - \frac {2 \, a b c d g^{2}}{{\left (b g x + a g\right )}^{2}} + \frac {a^{2} d^{2} g^{2}}{{\left (b g x + a g\right )}^{2}} + \frac {2 \, b c d g}{b g x + a g} - \frac {2 \, a d^{2} g}{b g x + a g} + d^{2}}\right )}{4 \, {\left (b g x + a g\right )}^{4} b g} + \frac {B d}{6 \, {\left (b g x + a g\right )}^{3} {\left (b c - a d\right )} b g^{2}} - \frac {2 \, A b^{3} g^{3} + 3 \, B b^{3} g^{3}}{8 \, {\left (b g x + a g\right )}^{4} b^{4} g^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.22, size = 833, normalized size = 4.00 \[ \frac {B \,b^{3} d^{4} \ln \left (\frac {\left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{2} e}{d^{2}}\right )}{4 \left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{4} \left (a^{4} d^{4}-4 a^{3} c \,d^{3} b +6 a^{2} c^{2} d^{2} b^{2}-4 a \,c^{3} d \,b^{3}+c^{4} b^{4}\right ) g^{5}}-\frac {A \,b^{3} d^{4}}{4 \left (a d -b c \right )^{4} \left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{4} g^{5}}+\frac {B \,b^{2} d^{4} \ln \left (\frac {\left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{2} e}{d^{2}}\right )}{\left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{4} \left (a^{3} d^{3}-3 a^{2} c \,d^{2} b +3 a \,c^{2} d \,b^{2}-b^{3} c^{3}\right ) \left (d x +c \right ) g^{5}}+\frac {A \,b^{2} d^{4}}{\left (a d -b c \right )^{4} \left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{3} g^{5}}-\frac {B \,b^{2} d^{4}}{2 \left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{4} \left (a^{3} d^{3}-3 a^{2} c \,d^{2} b +3 a \,c^{2} d \,b^{2}-b^{3} c^{3}\right ) \left (d x +c \right ) g^{5}}+\frac {3 B b \,d^{4} \ln \left (\frac {\left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{2} e}{d^{2}}\right )}{2 \left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{4} \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) \left (d x +c \right )^{2} g^{5}}-\frac {3 A b \,d^{4}}{2 \left (a d -b c \right )^{4} \left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{2} g^{5}}-\frac {7 B b \,d^{4}}{4 \left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{4} \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) \left (d x +c \right )^{2} g^{5}}+\frac {B \,d^{4} \ln \left (\frac {\left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{2} e}{d^{2}}\right )}{\left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{4} \left (a d -b c \right ) \left (d x +c \right )^{3} g^{5}}+\frac {A \,d^{4}}{\left (a d -b c \right )^{4} \left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right ) g^{5}}-\frac {13 B \,d^{4}}{6 \left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{4} \left (a d -b c \right ) \left (d x +c \right )^{3} g^{5}}-\frac {25 B \,d^{4}}{24 \left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{4} \left (d x +c \right )^{4} b \,g^{5}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 1.62, size = 699, normalized size = 3.36 \[ \frac {1}{24} \, B {\left (\frac {12 \, b^{3} d^{3} x^{3} - 3 \, b^{3} c^{3} + 13 \, a b^{2} c^{2} d - 23 \, a^{2} b c d^{2} + 25 \, a^{3} d^{3} - 6 \, {\left (b^{3} c d^{2} - 7 \, a b^{2} d^{3}\right )} x^{2} + 4 \, {\left (b^{3} c^{2} d - 5 \, a b^{2} c d^{2} + 13 \, a^{2} b d^{3}\right )} x}{{\left (b^{8} c^{3} - 3 \, a b^{7} c^{2} d + 3 \, a^{2} b^{6} c d^{2} - a^{3} b^{5} d^{3}\right )} g^{5} x^{4} + 4 \, {\left (a b^{7} c^{3} - 3 \, a^{2} b^{6} c^{2} d + 3 \, a^{3} b^{5} c d^{2} - a^{4} b^{4} d^{3}\right )} g^{5} x^{3} + 6 \, {\left (a^{2} b^{6} c^{3} - 3 \, a^{3} b^{5} c^{2} d + 3 \, a^{4} b^{4} c d^{2} - a^{5} b^{3} d^{3}\right )} g^{5} x^{2} + 4 \, {\left (a^{3} b^{5} c^{3} - 3 \, a^{4} b^{4} c^{2} d + 3 \, a^{5} b^{3} c d^{2} - a^{6} b^{2} d^{3}\right )} g^{5} x + {\left (a^{4} b^{4} c^{3} - 3 \, a^{5} b^{3} c^{2} d + 3 \, a^{6} b^{2} c d^{2} - a^{7} b d^{3}\right )} g^{5}} - \frac {6 \, \log \left (\frac {b^{2} e x^{2}}{d^{2} x^{2} + 2 \, c d x + c^{2}} + \frac {2 \, a b e x}{d^{2} x^{2} + 2 \, c d x + c^{2}} + \frac {a^{2} e}{d^{2} x^{2} + 2 \, c d x + c^{2}}\right )}{b^{5} g^{5} x^{4} + 4 \, a b^{4} g^{5} x^{3} + 6 \, a^{2} b^{3} g^{5} x^{2} + 4 \, a^{3} b^{2} g^{5} x + a^{4} b g^{5}} + \frac {12 \, d^{4} \log \left (b x + a\right )}{{\left (b^{5} c^{4} - 4 \, a b^{4} c^{3} d + 6 \, a^{2} b^{3} c^{2} d^{2} - 4 \, a^{3} b^{2} c d^{3} + a^{4} b d^{4}\right )} g^{5}} - \frac {12 \, d^{4} \log \left (d x + c\right )}{{\left (b^{5} c^{4} - 4 \, a b^{4} c^{3} d + 6 \, a^{2} b^{3} c^{2} d^{2} - 4 \, a^{3} b^{2} c d^{3} + a^{4} b d^{4}\right )} g^{5}}\right )} - \frac {A}{4 \, {\left (b^{5} g^{5} x^{4} + 4 \, a b^{4} g^{5} x^{3} + 6 \, a^{2} b^{3} g^{5} x^{2} + 4 \, a^{3} b^{2} g^{5} x + a^{4} b g^{5}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 6.51, size = 579, normalized size = 2.78 \[ -\frac {\frac {6\,A\,a^3\,d^3-6\,A\,b^3\,c^3+25\,B\,a^3\,d^3-3\,B\,b^3\,c^3+18\,A\,a\,b^2\,c^2\,d-18\,A\,a^2\,b\,c\,d^2+13\,B\,a\,b^2\,c^2\,d-23\,B\,a^2\,b\,c\,d^2}{12\,\left (a^3\,d^3-3\,a^2\,b\,c\,d^2+3\,a\,b^2\,c^2\,d-b^3\,c^3\right )}-\frac {d^2\,x^2\,\left (B\,b^3\,c-7\,B\,a\,b^2\,d\right )}{2\,\left (a^3\,d^3-3\,a^2\,b\,c\,d^2+3\,a\,b^2\,c^2\,d-b^3\,c^3\right )}+\frac {d\,x\,\left (13\,B\,a^2\,b\,d^2-5\,B\,a\,b^2\,c\,d+B\,b^3\,c^2\right )}{3\,\left (a^3\,d^3-3\,a^2\,b\,c\,d^2+3\,a\,b^2\,c^2\,d-b^3\,c^3\right )}+\frac {B\,b^3\,d^3\,x^3}{a^3\,d^3-3\,a^2\,b\,c\,d^2+3\,a\,b^2\,c^2\,d-b^3\,c^3}}{2\,a^4\,b\,g^5+8\,a^3\,b^2\,g^5\,x+12\,a^2\,b^3\,g^5\,x^2+8\,a\,b^4\,g^5\,x^3+2\,b^5\,g^5\,x^4}-\frac {B\,\ln \left (\frac {e\,{\left (a+b\,x\right )}^2}{{\left (c+d\,x\right )}^2}\right )}{4\,b^2\,g^5\,\left (4\,a^3\,x+\frac {a^4}{b}+b^3\,x^4+6\,a^2\,b\,x^2+4\,a\,b^2\,x^3\right )}-\frac {B\,d^4\,\mathrm {atanh}\left (\frac {-2\,a^4\,b\,d^4\,g^5+4\,a^3\,b^2\,c\,d^3\,g^5-4\,a\,b^4\,c^3\,d\,g^5+2\,b^5\,c^4\,g^5}{2\,b\,g^5\,{\left (a\,d-b\,c\right )}^4}-\frac {2\,b\,d\,x\,\left (a^3\,d^3-3\,a^2\,b\,c\,d^2+3\,a\,b^2\,c^2\,d-b^3\,c^3\right )}{{\left (a\,d-b\,c\right )}^4}\right )}{b\,g^5\,{\left (a\,d-b\,c\right )}^4} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 5.81, size = 947, normalized size = 4.55 \[ - \frac {B \log {\left (\frac {e \left (a + b x\right )^{2}}{\left (c + d x\right )^{2}} \right )}}{4 a^{4} b g^{5} + 16 a^{3} b^{2} g^{5} x + 24 a^{2} b^{3} g^{5} x^{2} + 16 a b^{4} g^{5} x^{3} + 4 b^{5} g^{5} x^{4}} - \frac {B d^{4} \log {\left (x + \frac {- \frac {B a^{5} d^{9}}{\left (a d - b c\right )^{4}} + \frac {5 B a^{4} b c d^{8}}{\left (a d - b c\right )^{4}} - \frac {10 B a^{3} b^{2} c^{2} d^{7}}{\left (a d - b c\right )^{4}} + \frac {10 B a^{2} b^{3} c^{3} d^{6}}{\left (a d - b c\right )^{4}} - \frac {5 B a b^{4} c^{4} d^{5}}{\left (a d - b c\right )^{4}} + B a d^{5} + \frac {B b^{5} c^{5} d^{4}}{\left (a d - b c\right )^{4}} + B b c d^{4}}{2 B b d^{5}} \right )}}{2 b g^{5} \left (a d - b c\right )^{4}} + \frac {B d^{4} \log {\left (x + \frac {\frac {B a^{5} d^{9}}{\left (a d - b c\right )^{4}} - \frac {5 B a^{4} b c d^{8}}{\left (a d - b c\right )^{4}} + \frac {10 B a^{3} b^{2} c^{2} d^{7}}{\left (a d - b c\right )^{4}} - \frac {10 B a^{2} b^{3} c^{3} d^{6}}{\left (a d - b c\right )^{4}} + \frac {5 B a b^{4} c^{4} d^{5}}{\left (a d - b c\right )^{4}} + B a d^{5} - \frac {B b^{5} c^{5} d^{4}}{\left (a d - b c\right )^{4}} + B b c d^{4}}{2 B b d^{5}} \right )}}{2 b g^{5} \left (a d - b c\right )^{4}} + \frac {- 6 A a^{3} d^{3} + 18 A a^{2} b c d^{2} - 18 A a b^{2} c^{2} d + 6 A b^{3} c^{3} - 25 B a^{3} d^{3} + 23 B a^{2} b c d^{2} - 13 B a b^{2} c^{2} d + 3 B b^{3} c^{3} - 12 B b^{3} d^{3} x^{3} + x^{2} \left (- 42 B a b^{2} d^{3} + 6 B b^{3} c d^{2}\right ) + x \left (- 52 B a^{2} b d^{3} + 20 B a b^{2} c d^{2} - 4 B b^{3} c^{2} d\right )}{24 a^{7} b d^{3} g^{5} - 72 a^{6} b^{2} c d^{2} g^{5} + 72 a^{5} b^{3} c^{2} d g^{5} - 24 a^{4} b^{4} c^{3} g^{5} + x^{4} \left (24 a^{3} b^{5} d^{3} g^{5} - 72 a^{2} b^{6} c d^{2} g^{5} + 72 a b^{7} c^{2} d g^{5} - 24 b^{8} c^{3} g^{5}\right ) + x^{3} \left (96 a^{4} b^{4} d^{3} g^{5} - 288 a^{3} b^{5} c d^{2} g^{5} + 288 a^{2} b^{6} c^{2} d g^{5} - 96 a b^{7} c^{3} g^{5}\right ) + x^{2} \left (144 a^{5} b^{3} d^{3} g^{5} - 432 a^{4} b^{4} c d^{2} g^{5} + 432 a^{3} b^{5} c^{2} d g^{5} - 144 a^{2} b^{6} c^{3} g^{5}\right ) + x \left (96 a^{6} b^{2} d^{3} g^{5} - 288 a^{5} b^{3} c d^{2} g^{5} + 288 a^{4} b^{4} c^{2} d g^{5} - 96 a^{3} b^{5} c^{3} g^{5}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________